import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { createBrowserHistory } from 'history'
import router from './router'
import homeModel from './model/home'
import loginModel from './model/login'
import 'bootstrap/dist/css/bootstrap.min.css'
import 'font-awesome/css/font-awesome.css'
import './assets/css/index.css'
// 1、引入dva
import dva from 'dva'
// 2、创建
const app = new dva({
  history: createBrowserHistory()
})
// 3、注册路由
app.router(router)
// 4、注册插件
// 5、注册model
// 5、5卸载model
app.model(homeModel)
app.model(loginModel)
// 6、启动
app.start('#root')
// ReactDOM.render(
//   <React.StrictMode>
//     <App />
//   </React.StrictMode>,
//   document.getElementById('root')
// );

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
